package ejb;

import java.util.Properties;

import javax.naming.Context;
import javax.naming.InitialContext;
import javax.naming.NamingException;

public class IniContextDemo {
	private static final String CF = "org.jboss.naming.NamingContextFactory";
	private static final String PRE = "org.jboss.naming.client:org.jnp.interfaces";
	private static final String PRO = "jnp://10.0.219.1:1099,jnp://10.0.219.2:1099";
	public static void main(String[] args) throws NamingException {
		  Properties properties = new Properties();
          properties.setProperty(Context.INITIAL_CONTEXT_FACTORY, CF);
          properties.setProperty(Context.URL_PKG_PREFIXES, PRE);
          properties.setProperty(Context.PROVIDER_URL, PRO);
          InitialContext jndiContext = new InitialContext(properties);

	}
}
